/**
  ******************************************************************************
  * @file           : tskcfg.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __TSKCFG_H
#define __TSKCFG_H

/* Includes ------------------------------------------------------------------*/
#include <stdio.h>

#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "queue.h"
#include "semphr.h"
#include "stream_buffer.h"
#include "event_groups.h"

#define DEAMON_TSK_PRIORITY                                          (tskIDLE_PRIORITY + 1)
#define DEAMON_STACK_SIZE                                            512u
extern TaskHandle_t xDeamon_Thd;
extern StaticTask_t xDeamon_Tcb;
extern StackType_t  xDeamon_Stk[DEAMON_STACK_SIZE];
extern void vDeamon_Task(void * pvParameters);

#define IRKEY_TSK_PRIORITY                                           (tskIDLE_PRIORITY + 2)
#define IRKEY_STACK_SIZE                                             1024u
extern TaskHandle_t xIrKey_Thd;
extern StaticTask_t xIrKey_Tcb;
extern StackType_t  xIrKey_Stk[IRKEY_STACK_SIZE];
extern void vIrKey_Task(void * pvParameters);

#define RS485N1_TSK_PRIORITY                                         (tskIDLE_PRIORITY + 3)
#define RS485N1_STACK_SIZE                                           256u
extern TaskHandle_t xRs485n1_Thd;
extern StaticTask_t xRs485n1_Tcb;
extern StackType_t  xRs485n1_Stk[RS485N1_STACK_SIZE];
extern void vRs485n1_Task(void * pvParameters);

#define HLKB35_TSK_PRIORITY                                          (tskIDLE_PRIORITY + 4)
#define HLKB35_STACK_SIZE                                            256u
extern TaskHandle_t xHlkb35_Thd;
extern StaticTask_t xHlkb35_Tcb;
extern StackType_t  xHlkb35_Stk[HLKB35_STACK_SIZE];
extern void vHlkb35_Task(void * pvParameters);

#define FIBER_TSK_PRIORITY                                           (tskIDLE_PRIORITY + 5)
#define FIBER_STACK_SIZE                                              256u
extern TaskHandle_t xFiber_Thd;
extern StaticTask_t xFiber_Tcb;
extern StackType_t  xFiber_Stk[FIBER_STACK_SIZE];
extern void vFiber_Task(void * pvParameters);

#define DCLCD_TSK_PRIORITY                                           (tskIDLE_PRIORITY + 6)
#define DCLCD_STACK_SIZE                                             4096u
extern TaskHandle_t xDcLcd_Thd;
extern StaticTask_t xDcLcd_Tcb;
extern StackType_t  xDcLcd_Stk[DCLCD_STACK_SIZE];
extern void vDcLcd_Task(void * pvParameters);

#define GUI_TSK_PRIORITY                                             (tskIDLE_PRIORITY + 7)
#define GUI_STACK_SIZE                                               4096u
extern TaskHandle_t xGui_Thd;
extern StaticTask_t xGui_Tcb;
extern StackType_t  xGui_Stk[GUI_STACK_SIZE];
extern void vGui_Task( void * pvParameters );

#define ETHERNET_TSK_PRIORITY                                        (tskIDLE_PRIORITY + 8)
#define ETHERNET_STACK_SIZE                                          8192u
extern TaskHandle_t xEthernet_Thd;
extern StaticTask_t xEthernet_Tcb;
extern StackType_t  xEthernet_Stk[ETHERNET_STACK_SIZE];
extern void vEthernet_Task(void * pvParameters);

#define MODBUSTCP_TSK_PRIORITY                                       (tskIDLE_PRIORITY + 9)
#define MODBUSTCP_STACK_SIZE                                         4096u
extern TaskHandle_t xModbusTCP_Thd;
extern StaticTask_t xModbusTCP_Tcb;
extern StackType_t  xModbusTCP_Stk[MODBUSTCP_STACK_SIZE];
extern void vModbusTCP_Task(void * pvParameters);

#define PRODUCTIONRT_TSK_PRIORITY                                    (tskIDLE_PRIORITY + 9)
#define PRODUCTIONRT_STACK_SIZE                                      8192u
extern TaskHandle_t xProductionRT_Thd;
extern StaticTask_t xProductionRT_Tcb;
extern StackType_t  xProductionRT_Stk[PRODUCTIONRT_STACK_SIZE];
extern void vProductionRT_Task(void * pvParameters);

#define PRODUCTIONUP_TSK_PRIORITY                                    (tskIDLE_PRIORITY + 10)
#define PRODUCTIONUP_STACK_SIZE                                      8192u
extern TaskHandle_t xProductionUP_Thd;
extern StaticTask_t xProductionUP_Tcb;
extern StackType_t  xProductionUP_Stk[PRODUCTIONUP_STACK_SIZE];
extern void vProductionUP_Task(void * pvParameters);

#define PRODUCTIONDB_TSK_PRIORITY                                    (tskIDLE_PRIORITY + 11)
#define PRODUCTIONDB_STACK_SIZE                                      8192u
extern TaskHandle_t xProductionDB_Thd;
extern StaticTask_t xProductionDB_Tcb;
extern StackType_t  xProductionDB_Stk[PRODUCTIONDB_STACK_SIZE];
extern void vProductionDB_Task(void * pvParameters);

#define STORAGE_TSK_PRIORITY                                         (tskIDLE_PRIORITY + 12)
#define STORAGE_STACK_SIZE                                           1024u
extern TaskHandle_t xStorage_Thd;
extern StaticTask_t xStorage_Tcb;
extern StackType_t  xStorage_Stk[STORAGE_STACK_SIZE];
extern void vStorage_Task(void * pvParameters);

#define SENSOR_TSK_PRIORITY                                          (tskIDLE_PRIORITY + 13)
#define SENSOR_STACK_SIZE                                            1024u
extern TaskHandle_t xSensor_Thd;
extern StaticTask_t xSensor_Tcb;
extern StackType_t  xSensor_Stk[SENSOR_STACK_SIZE];
extern void vSensor_Task(void * pvParameters);

#define MEASURE_CYCLE_TSK_PRIORITY                                   (tskIDLE_PRIORITY + 14)
#define MEASURE_CYCLE_STACK_SIZE                                     1024u
extern TaskHandle_t xMeasureCycle_Thd;
extern StaticTask_t xMeasureCycle_Tcb;
extern StackType_t  xMeasureCycle_Stk[MEASURE_CYCLE_STACK_SIZE];
extern void vMeasureCycle_Task(void * pvParameters);

#define MEASURE_RT_TSK_PRIORITY                                      (tskIDLE_PRIORITY + 15)
#define MEASURE_RT_STACK_SIZE                                        4096u
extern TaskHandle_t xMeasureRt_Thd;
extern StaticTask_t xMeasureRt_Tcb;
extern StackType_t  xMeasureRt_Stk[MEASURE_RT_STACK_SIZE];
extern void vMeasureRt_Task(void * pvParameters);


extern void APP_CreateTask(void);
extern void APP_RunTimeCreateTask(void);
extern void app_queue_create(void);

extern QueueHandle_t sd_drvmsg_qhd;
extern QueueHandle_t sensor_recv_qhd;
extern QueueHandle_t gui_cmd_qhd;
extern QueueHandle_t dclcd_recv_qhd;
extern QueueHandle_t dclcd_send_qhd;
extern QueueHandle_t irkey_wave_qhd;
extern QueueHandle_t ethernet_ctrl_qhd;
extern QueueHandle_t ethernet_send_qhd;
extern QueueHandle_t ethernet_isr_qhd;
extern QueueHandle_t prod_database_qhd;
extern QueueHandle_t storage_qhd;
extern QueueHandle_t produp_ethfb_qhd[2];
extern QueueHandle_t prodrt_ethfb_qhd[2];
extern QueueHandle_t mbtcp_ethfb_qhd[2];

extern QueueSetHandle_t ethernet_qshd;       /* 队列集 */
extern QueueSetHandle_t produp_ethfb_qshd;   /* 队列集 */
extern QueueSetHandle_t prodrt_ethfb_qshd;   /* 队列集 */
extern QueueSetHandle_t mbtcp_ethfb_qshd;    /* 队列集 */


#endif /* __TSKCFG_H */

/************************ END OF FILE *********/
